<template>
  <div class="room-box">
    <!-- <h1>{{$store.state.room.title}}</h1> -->
    <div class="boxs">
      <h2>房间</h2>
      <div>
        <span>
          <img src="../../assets/img/room/yb1.png" alt="" />
        </span>
        <router-link to="/home/phb/ml">
        <span class="popup">           
              <img src="../../assets/img/room/yb2.png" alt="" />              
        </span>
        </router-link>
        
      </div>
    </div>
    <!-- ========================================================== -->
    <!-- <van-tabs v-model="active" >
      <van-tab title="好友" @click=cup>   
      </van-tab>
      <van-tab title="推荐" title-active-color="white" ></van-tab>
      <van-tab title="交友"></van-tab>
      <van-tab title="桌游"></van-tab>
      <van-tab title="音乐"></van-tab>
    </van-tabs> -->
    <!-- <div class="nav-list">
      <li class="you" >
        <router-link to="Cup">好友</router-link>
      </li>
      <li>推荐</li>     
      <li>交友</li>
      <li>桌游</li>
      <li>音乐</li>
    </div> -->
    <div class="nav-list">
      <li v-for="(item,index) in list" :key="index" @click="change(index)" :class="{active:pnum===index}">    
        <router-link :to="item.address">{{item.tittle}}</router-link>
      </li>
    </div>
    <!-- ========================================================== -->
    <div class="heads">
      <ul>
        <router-link to="Music">
        <li>
          <div class="left">
            <img src="../../assets/img/room/da1.png" alt="" />
            <div class="zai">
              <div class="friend">
                <img src="../../assets/img/room/Icon1.png" alt="" />
                <span>拍卖</span>
              </div>
              <p>崽崽拍卖 娱乐至上</p>
              <div class="left-end">
                <span>[接待]崽崽说名字长会有傻</span>
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>8</span>
          </div>
        </li>
        </router-link>
        <li>
          <div class="left">
            <img src="../../assets/img/room/da2.png" alt="" />
            <div>
              <div class="friend">
                <img src="../../assets/img/room/Icon2.png" alt="" />
                <span>交友</span>
              </div>
              <p>联盟/纳新人福利</p>
              <div class="left-end">
                <img src="../../assets/img/room/1.png" alt="" />
                <img src="../../assets/img/room/2.png" alt="" />
                <img src="../../assets/img/room/3.png" alt="" />
                <img src="../../assets/img/room/4.png" alt="" />
                <img src="../../assets/img/room/5.png" alt="" />
                <img src="../../assets/img/room/6.png" alt="" />
                <img src="../../assets/img/room/7.png" alt="" />
                <img src="../../assets/img/room/8.png" alt="" />
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>28</span>
          </div>
        </li>
        <li>
          <div class="left">
            <img src="../../assets/img/room/da3.png" alt="" />
            <div>
              <div class="friend">
                <img src="../../assets/img/room/KTV.png" alt="" />
                <span class="kkk">KTV</span>
              </div>
              <p>千秋的房间</p>
              <div class="left-end">
                <img src="../../assets/img/room/1.png" alt="" />
                <img src="../../assets/img/room/2.png" alt="" />
                <img src="../../assets/img/room/3.png" alt="" />
                <img src="../../assets/img/room/4.png" alt="" />
                <img src="../../assets/img/room/5.png" alt="" />
                <img src="../../assets/img/room/6.png" alt="" />
                <img src="../../assets/img/room/7.png" alt="" />
                <img src="../../assets/img/room/8.png" alt="" />
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>28</span>
          </div>
        </li>
        <li>
          <div class="left">
            <img src="../../assets/img/room/da4.png" alt="" />
            <div>
              <div class="friend">
                <img src="../../assets/img/room/Icon2.png" alt="" />
                <span>交友</span>
              </div>
              <p>唠嗑唠嗑唠嗑</p>
              <div class="left-end">
                <img src="../../assets/img/room/1.png" alt="" />
                <img src="../../assets/img/room/2.png" alt="" />
                <img src="../../assets/img/room/3.png" alt="" />
                <img src="../../assets/img/room/4.png" alt="" />
                <img src="../../assets/img/room/5.png" alt="" />
                <img src="../../assets/img/room/6.png" alt="" />
                <img src="../../assets/img/room/7.png" alt="" />
                <img src="../../assets/img/room/8.png" alt="" />
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>35</span>
          </div>
        </li>
        <li>
          <div class="left">
            <img src="../../assets/img/room/da5.png" alt="" />
            <div>
              <div class="friend">
                <img src="../../assets/img/room/Icon2.png" alt="" />
                <span>交友</span>
              </div>
              <p>海选赛开始啦！</p>
              <div class="left-end">
                <img src="../../assets/img/room/1.png" alt="" />
                <img src="../../assets/img/room/2.png" alt="" />
                <img src="../../assets/img/room/3.png" alt="" />
                <img src="../../assets/img/room/4.png" alt="" />
                <img src="../../assets/img/room/5.png" alt="" />
                <img src="../../assets/img/room/6.png" alt="" />
                <img src="../../assets/img/room/7.png" alt="" />
                <img src="../../assets/img/room/8.png" alt="" />
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>25</span>
          </div>
        </li>
        <li>
          <div class="left">
            <img src="../../assets/img/room/da6.png" alt="" />
            <div>
              <div class="friend">
                <img src="../../assets/img/room/Icon2.png" alt="" />
                <span>交友</span>
              </div>
              <p>歌厅（点歌不点人）</p>
              <div class="left-end">
                <img src="../../assets/img/room/1.png" alt="" />
                <img src="../../assets/img/room/2.png" alt="" />
                <img src="../../assets/img/room/3.png" alt="" />
                <img src="../../assets/img/room/4.png" alt="" />
                <img src="../../assets/img/room/5.png" alt="" />
                <img src="../../assets/img/room/6.png" alt="" />
                <img src="../../assets/img/room/7.png" alt="" />
                <img src="../../assets/img/room/8.png" alt="" />
              </div>
            </div>
          </div>
          <div class="right">
            <img src="../../assets/img/room/Icon11.png" alt="" />
            <span>16</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import {getRuroom} from "@/services"
export default {
  data() {
    return{
        list:[
       {
         tittle:"好友",
         address:"Cup"
         },
         {
         tittle:"推荐",
         address:"Room"
         },
         {
         tittle:"交友",
         address:""
         },
        {
         tittle:"桌游",
         address:""
         },
         {
         tittle:"音乐",
         address:""
         },
         ],
       pnum:0
         
    }
   
  },
methods: {
 change(index){
this.pnum=index
 }
},
  created() {
    getRuroom().then(res =>{
      console.log(res.data);

    })
  },
};
</script>

<style lang="scss" >
.room-box {
  color: white;
  margin: 0 auto;
  .active{
 
    border-bottom: 1px solid #63D197;
  }
  .boxs {
    width: 90%;
    height: 54px;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    h2 {
      line-height: 54px;
      font-size: 44px;
    }
    div {
      display: flex;
      align-items: center;
      vertical-align: middle;
      .popup {
        background-color: black;
      }
      span {
        // height: 100%;
        display: inline-block;
        width: 33px;
        height: 33px;
        // line-height: 33px;
        margin: 0 10px;
        img {
          vertical-align: middle;
          width: 33px;
          height: 33px;
          //   margin: 0  10px;
        }
      }
    }
  }
   .nav-list {
    margin-bottom: 41px;
    width: 90%;
    margin: 0 auto;
    li {
      float: left;
      height: 55px;
      color:#6666 ;
      font-size: 32px;
      margin: 0 10px;
    }
    li a{
      color: #666666;
    }
  }
  // .van-tabs {
  //   width: 80%;
  //   height: 85px;
  //   margin-top: 30px;
  //   .van-tabs__wrap {
  //     width: 80%;
  //     height: 85px;
  //     .van-tab {
  //       width: 60px;
  //       background-color: #1c1c1c;
  //     }
  //     .van-tab__text {
  //         font-size: 30px;
  //         font-weight: 400;
  //         color: #666666;
  //       }
  //   }
  // }

  .heads {
    min-width: 95%;
    width: 95%;
    margin: 0 auto;
    ul {
      margin-top: 41px;
      li {
        padding: 20px;
        height: 180px;
        width: 690px;
        background-color: #2d2d2d;
        display: flex;
        justify-content: space-between;
        border-radius: 20px;
        margin-bottom: 20px;
        border-bottom: 2px solid #cecece;
        border: none;
      }
      img {
        width: 112px;
        height: 112px;
      }
      .left {
        display: flex;
        justify-content: space-between;
        width: 67%;

      } 
      .left>div{
         margin-left: 20px;
      }     
      .friend {
        width: 391px;
       .kkk{
        color:#63D197;
        z-index: 1;
      }
      }
      .friend img {
        width: 26px;
        height: 22px;
      }
      .friend span {
        font-size: 24px;
        color: #9260ff;
      }
      .left-end {
        display: flex;
      }
      .left-end span {
        font-size: 24px;
      }
      .left-end img {
        width: 38px;
        height: 38px;
        margin-right: -10px;
      }
      .right {
        width: 100px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 24px;
        color: #666666;
        border-left: #363636 4px solid;
        
      }
      .right img {
        width: 32px;
        height: 34px;
        margin-bottom: 10px;
      }
    }
    p {
      font-size: 30px;
      color: white;
      margin: 10px 0;
    }
  }
}
</style>
